<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul id="todos"></ul>

    <script>
        async function fetchData() {
            try {
                const response = await fetch('https://dj2yq0.laf.dev/get-list');
                const { data } = await response.json();
                // console.log(data);
                document.querySelector('#todos').innerHTML =
                 data.map(todo => `
                 <li>${todo.txt}</li>
                 `).join('')
            } catch (error) {
                console.log(error);
            }
        }

        fetchData();
    </script>
</body>
</html>